package com.gao.String;

/**
 * @Author: ShanYuqing
 * @Version: v1.0
 */
public class StringMehod3 {
    /*
            substring(int beginIndex):根据传入的索引开始做截取，截取到字符串的末尾
            substring(int beginIndex,int endIndex):根据传入的开始和结束索引，对字符串做截取
                                                                -包含头，不包含尾
     */
    public static void main(String[] args) {
        String s = "aefrd";
         String substring = s.substring(0, 1);
        System.out.println(substring);
    }

    private static void mehod1() {
        String s = "asass";
        String substring = s.substring(3);
        System.out.println(substring);
    }
}
